#ifndef STATUSBARITEM_H
#define STATUSBARITEM_H

#include <QGraphicsSimpleTextItem>
#include <QGraphicsRectItem>
#include <QBrush>
#include <QPen>
#include <QPropertyAnimation>
#include <QTimer>


class StatusBarItemPrivate
 {
 public:
     int offset;
     QGraphicsSimpleTextItem *textItem;
 };

class StatusBarItem : public QObject, public QGraphicsRectItem
{
    Q_OBJECT
    Q_PROPERTY(int offset READ offset WRITE setOffset)

    public:
        StatusBarItem();
        ~StatusBarItem();

        int offset() const { return d->offset; }
        void setRect(qreal x, qreal y, qreal w, qreal h);

    public slots:
        void setText(QString text);

        void showText(QString text, quint32 timeout=3000);
        void show();
        void hide();

        void setOffset(int offset);

    private:
        StatusBarItemPrivate *d;
};




#endif // STATUSBARITEM_H
